package part19;

/**
 * @author wcj
 * @Date 2021/6/5 17:43
 * @Version 1.0
 */
public class Part197 {

    public static void main(String[] args) {
        Food salad = Food.Appetizer.SALAD;
    }
}

/**
 * 使用接口组织枚举类是实现对于枚举分组的唯一方式:当然，这是对简单的枚举而言
 * 如果是枚举的枚举，我们这样做就不方便了
 */
interface Food {

    enum Appetizer implements Food {
        SALAD, SOUP, SPRINT_ROLLS,
    }

    enum MainCourse implements Food {
        LASAGNE, BURRITO, PAD_THAI,
        LENTILS, HUMMOUS, VINDALOO,
    }

    enum Dessert implements Food {
        TIRAMISU, GELATO, BLACK_FOREST_CAKE,
        FRUIT, CREME_CARAMEL,
    }

    enum Coffee implements Food {
        BLACK_COFFEE, DECAF_COFFEE, ESPRESSO,
        LATTE, CAPPUCCINO, TEA, HERB_TEA
    }
}
